package com.murong.ai.coder.entity;

import lombok.Data;

import java.util.List;

/**
 * 由table-inputs.json生成，存储表结构定义的实体类
 */
@Data
public class TableEntity {

    @Data
    public static class Field {
        private String nameCamel;
        private String nameSnake;
        private String type;
        private String commentCn;
        private String commentEn;
        private String dbTyp;
        private Integer length;
    }

    @Data
    public static class Index {
        private String name;
        private String type;
        private List<String> fields;
    }

    private String tableNameCamel;
    private String tableNameSnake;
    private String tableCommentCn;
    private String tableCommentEn;
    private List<Field> fields;
    private Index primaryKey;
    private List<Index> indexes;
    private List<Index> uniqueIndexes;
    private String updateBy;
    private String updateTime;
    private Properties properties;

    public Properties getProperties(){
        if(properties == null){
            properties=new Properties();
        }
        return properties;
    }

    @Data
    public static class Properties {
        private String entityPath;
        private String mapperPath;
        private String xmlPath;
    }
} 